14 research outputs found

    Model Checking Transactional Sapphire

    Get PDF
    This report describes how we verified major aspects of the Transactional Sap- phire garbage collector for Java

    Profile Guided Offline Optimization of Hidden Class Graphs for JavaScript VMs in Embedded Systems

    Get PDF
    JavaScript is increasingly used for the Internet of Things (IoT) on embedded systems. However, JavaScript's memory footprint is a challenge, because normal JavaScript virtual machines (VMs) do not fit into the small memory of IoT devices. In part this is because a significant amount of memory is used by hidden classes, which are used to represent JavaScript's dynamic objects efficiently. In this research, we optimize the hidden class graph to minimize their memory use. Our solution collects the hidden class graph and related information for an application in a profiling run, and optimizes the graph offline. We reduce the number of hidden classes by avoiding introducing intermediate ones, for instance when properties are added one after another. Our optimizations allow the VM to assign the most likely final hidden class to an object at its creation. They also minimize re-allocation of storage for property values, and reduce the polymorphism of inline caches. We implemented these optimizations in a JavaScript VM, eJSVM, and found that offline optimization can eliminate 61.9% of the hidden classes on average. It also improves execution speed by minimizing the number of hidden class transitions for an object and reducing inline cache misses

    Optimizing the Order of Bytecode Handlers in Interpreters using a Genetic Algorithm

    Get PDF
    Interpreter performance remains important today. Interpreters are needed in resource constrained systems, and even in systems with just-in-time compilers, they are crucial during warm up. A common form of interpreters is a bytecode interpreter, where the interpreter executes bytecode instructions one by one. Each bytecode is executed by the corresponding bytecode handler. In this paper, we show that the order of the bytecode handlers in the interpreter source code affects the execution performance of programs on the interpreter. On the basis of this observation, we propose a genetic algorithm (GA) approach to find an approximately optimal order. In our GA approach, we find an order optimized for a specific benchmark program and a specific CPU. We evaluated the effectiveness of our approach on various models of CPUs including x86 processors and an ARM processor. The order found using GA improved the execution speed of the program for which the order was optimized between 0.8% and 23.0% with 7.7% on average. We also assess the cross-benchmark and cross-machine performance of the GA-found order. Some orders showed good generalizability across benchmarks, speeding up all benchmark programs. However, the solutions do not generalize across different machines, indicating that they are highly specific to a microarchitecture

    Transactional Sapphire: Lessons in High Performance, On-the-fly Garbage Collection

    Get PDF
    Constructing a high-performance garbage collector is hard. Constructing a fully concurrent 'on-the-fly', compacting collector is much more so. We describe our experience of implementing the Sapphire algorithm as the first on-the-fly, parallel, replication copying, garbage collector for the Jikes RVM Java virtual machine. In part, we explain our innovations such as copying with hardware and software transactions, on-the-fly management of Java's reference types and simple, yet correct, lock-free management of volatile fields in a replicating collector. We fully evaluate, for the first time, and using realistic benchmarks, Sapphire's performance and suitability as a low latency collector. An important contribution of this work is a detailed description of our experience of building an on-the-fly copying collector for a complete JVM with some assurance that it is correct. A key aspect of this is model checking of critical components of this complicated and highly concurrent system

    Exploring Garbage Collection with Haswell Hardware Transactional Memory

    Get PDF
    Intel’s latest processor microarchitecture, Haswell, adds support for a restricted form of transactional memory to the x86 programming model. We explore how this can be applied to three garbage collection scenarios in Jikes RVM: parallel copying, concurrent copying and bitmap marking. We demonstrate gains in concurrent copying speed over traditional synchronisation mechanisms of 48–101%. We also show how similar but portable performance gains can be achieved through software transactional memory techniques. We identify the architectural overhead of capturing sufficient work for transactional execution as a major stumbling block to the effective use of transactions in the other scenarios

    Visualization of Counterexamples of Memory Model-aware Model Checking Using SPIN

    No full text

    Reference Object Processing in On-The-Fly Garbage Collection

    Get PDF
    Most proposals for on-the-fly garbage collection ignore the ques- tion of Java’s weak and other reference types. However, we show that reference types are heavily used in DaCapo benchmarks. Of the few collectors that do address this issue, most block mutators, either globally or individually, while processing reference types. We introduce a new framework for processing reference types on- the-fly in Jikes RVM. Our framework supports both insertion and deletion write barriers. We have model checked our algorithm and incorporated it in our new implementation of the Sapphire on-the- fly collector. Using a deletion barrier, we process references while mutators are running in less than three times the time that previous approaches take while mutators are halted; our overall execution times are no worse, and often better

    Design and Implementation of a Java Bytecode Manipulation Library for Clojure

    Get PDF
    Recently, the Java Virtual Machine (JVM) has become widely used as a common execution platform for various applications. There is often the need to manipulate bytecodes at class-load time, particularly in application domains that demand dynamic modification of program behaviors. Whereas several bytecode manipulation tools for Java exist for implementing such behaviors, JVM is also the platform for various modern programming languages, and there is no need to write bytecode manipulation programs exclusively in Java. In this paper, we propose a novel bytecode manipulation library for Clojure, a Lisp dialect running on JVM. Our library is as expressive and flexible as ASM, the de facto standard bytecode manipulation tool in Java, while enabling more concise representation of typical manipulation cases. Our library works at class-load time as a series of rewrites of (parts of) the tree representing the target class file, basically in a similar way to Lisp's macro system. However, our library differs from Lisp's macro system in the following significant respects. First, instead of matching a single name against the first item of the target form (tree), our library matches a tree pattern against the target tree itself during macro expansion so that users can define rewriting rules for raw class files that cannot contain any special tags (names) for pattern matching. Furthermore, along with matching tree patterns, our library can extract any information from the static context easily and thus allows users to avoid cumbersome manual management of such information
    corecore